<html>
<head><meta charset="utf-8"><title>name · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html">name</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223229177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229177">(Jan 19 2021 at 14:00)</a>:</h4>
<p><a href="/user_uploads/4715/fiBtGBTHLqdNfciWPZSWay6F/image.png">image.png</a> </p>
<div class="message_inline_image"><a href="/user_uploads/4715/fiBtGBTHLqdNfciWPZSWay6F/image.png" title="image.png"><img src="/user_uploads/4715/fiBtGBTHLqdNfciWPZSWay6F/image.png"></a></div><p><span class="user-mention" data-user-id="300586">@Lukas Wirth</span> looks like self. is missclassified as a module here</p>



<a name="223229346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229346">(Jan 19 2021 at 14:01)</a>:</h4>
<p>There's no self parameter</p>



<a name="223229641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229641">(Jan 19 2021 at 14:03)</a>:</h4>
<p>yes, but it thinks that <code>self.</code> is a module, and highlights the whole file <span aria-label="rofl" class="emoji emoji-1f923" role="img" title="rofl">:rofl:</span></p>



<a name="223229707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229707">(Jan 19 2021 at 14:03)</a>:</h4>
<p>oh :D</p>



<a name="223229731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229731">(Jan 19 2021 at 14:03)</a>:</h4>
<p>Maybe it tries to tell me that I am overdoing unsafe here...</p>



<a name="223229815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223229815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223229815">(Jan 19 2021 at 14:04)</a>:</h4>
<p>I'll take a look at that <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<a name="223244095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223244095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223244095">(Jan 19 2021 at 15:37)</a>:</h4>
<p>What should it be classified as instead though, unresolved reference? Technically self refers to a module there since there is no self param. At least rustc thinks so as well in this erroneous case.</p>



<a name="223249237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/name/near/223249237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/name.html#223249237">(Jan 19 2021 at 16:14)</a>:</h4>
<p>I think it should see that <code>self.x</code> is invalid for things in the type namespace and filter out all types (including modules)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>